Skip to content

Conversation

@ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented May 6, 2025

Motivation

When this path is executed from inside a docker container, which we usually run as root, $HOME will point to /root, but dirs::config_dir() will actually return $HOME/.config, but the .config directory won't be created yet.
Then when we call fs_err::create_dir("/root/.config/linera"), it can fail because .config won't exist yet.

Proposal

Recursively create directories so that .config is also created, and the command succeeds from within Docker containers as well.

Test Plan

Deploys were failing with this, now they succeed.

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Copy link
Contributor Author

ndr-ds commented May 6, 2025

@ndr-ds ndr-ds requested review from Twey, afck, christos-h and ma2bd May 6, 2025 22:19
@afck
Copy link
Contributor

afck commented May 7, 2025

(Does this one line really need to be a separate PR in a stack? It gets rebased and CI triggered every time something below it in the stack changes… also, lots of GitHub notification noise.)

@ndr-ds ndr-ds force-pushed the 05-02-adjust_state_hash_computation_bucket branch from 63ff628 to cd3ab06 Compare May 7, 2025 17:10
@ndr-ds ndr-ds force-pushed the 05-06-recursively_create_parent_directories_when_creating_config_dir branch from d858999 to 1cfe578 Compare May 7, 2025 17:10
@ndr-ds ndr-ds force-pushed the 05-02-adjust_state_hash_computation_bucket branch from cd3ab06 to b7dd2db Compare May 7, 2025 19:11
@ndr-ds ndr-ds force-pushed the 05-06-recursively_create_parent_directories_when_creating_config_dir branch from 1cfe578 to 2997a46 Compare May 7, 2025 19:11
@ndr-ds ndr-ds force-pushed the 05-02-adjust_state_hash_computation_bucket branch from b7dd2db to f6712ff Compare May 9, 2025 16:57
@ndr-ds ndr-ds force-pushed the 05-06-recursively_create_parent_directories_when_creating_config_dir branch from 2997a46 to 296337d Compare May 9, 2025 16:57
Copy link
Contributor Author

ndr-ds commented May 9, 2025

Merge activity

  • May 9, 5:25 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 9, 5:29 PM EDT: Graphite rebased this pull request as part of a merge.
  • May 9, 5:29 PM EDT: @ndr-ds merged this pull request with Graphite.

@ndr-ds ndr-ds changed the base branch from 05-02-adjust_state_hash_computation_bucket to graphite-base/3897 May 9, 2025 21:26
@ndr-ds ndr-ds changed the base branch from graphite-base/3897 to main May 9, 2025 21:28
@ndr-ds ndr-ds force-pushed the 05-06-recursively_create_parent_directories_when_creating_config_dir branch from 296337d to 77e7499 Compare May 9, 2025 21:28
@ndr-ds ndr-ds merged commit 844c82b into main May 9, 2025
25 checks passed
@ndr-ds ndr-ds deleted the 05-06-recursively_create_parent_directories_when_creating_config_dir branch May 9, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants